#include<stdio.h>
int main()
{
	int n = 0, i=0, count=0;
	scanf_s("%d", &n);
	for (i = 0; i < 32; i++)
	{
		if (((n >> i) & 1) == 1)
		{
			count++;
		}
	}
	printf("%d", count);
	return 0;
}